#include "PositionVector.h"
#include <iostream>
#include <string>
#include <vector>
#include <sstream>

using namespace std;


PositionVector::PositionVector (uint _id, uint myPosition) 
:id(_id),
 firstOccurrence(myPosition)
{
//	positions.push_back(myPosition);
}

string PositionVector::showPositions() {
	string positionsString = "(posicoes: ";
	vector<unsigned short>::iterator it;
	stringstream aux;
	aux << firstOccurrence;
	positionsString += aux.str();
	it = positions.begin();
	while (it != positions.end()) {
		stringstream aux;
		aux << *it;
		positionsString += ", " + aux.str();
		it++;
	}
//	stringstream aux2;
//	aux2 << positions.capacity() + 1;
	positionsString += /*" - cap: " + aux2.str() + */ ")";
	return positionsString;
}


